<!doctype html>
<html lang="zh">
<head>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>云计算考试云主机（服务）应用实践</title>
    <link rel="short icon" type="images/x-icon" href="/static/favicon.ico">
    <link rel="stylesheet" href="/static/css/tabler.min.css">
</head>
<body class=" d-flex flex-column">
<div class="page page-center" v-scope @vue:mounted="init">

    <div class="container container-tight py-4">
        <div class="card card-md" v-if="!alreadySign">
            <div class="card-body">
                <h2 class="h2 text-center mb-4">还差一步就完成了</h2>
                <div>
                    <div class="mb-3">
                        <div class="alert" role="alert" v-if="message.length!=0"
                             :class="{'alert-success': success, 'alert-danger': !success}">
                            <div class="d-flex">{{message}}</div>
                        </div>
                    </div>
                    <div class="mb-3">
                        <label class="form-label">学号</label>
                        <input type="sno" class="form-control" placeholder="请输入学号" autocomplete="off"
                               v-model.trim="sno">
                    </div>
                    <div class="mb-2">
                        <label class="form-label">
                            姓名
                        </label>
                        <div class="input-group input-group-flat">
                            <input type="text" class="form-control" placeholder="请输入姓名" autocomplete="off"
                                   v-model.trim="name">
                        </div>
                    </div>
                    <div class="mb-2">
                        <label class="form-label">
                            密码
                        </label>
                        <div class="input-group input-group-flat">
                            <input type="password" class="form-control" placeholder="请输入密码" autocomplete="off"
                                   v-model.trim="password"
                                   :class="{'is-invalid': !success && sendRequest}">
                        </div>
                    </div>
                </div>
                <div class="form-footer" v-if="canSign">
                    <button type="submit" class="btn btn-primary w-100" @click="test">签到</button>
                </div>

            </div>
        </div>
        <div v-if="alreadySign">
            <h2 class="page-title d-flex justify-content-center"><span class="text-blue">{{signedName}}</span>，您已经完成本题目！
            </h2>
            <div class="hr"></div>
            <div class="card-body">
                <div class="row">

                    <div class="col">
                        <a href="/list" class="btn w-100">
                            查看签到名单
                        </a>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>

</body>

<script src="/static/scripts/tabler.min.js" defer></script>
<script type="module" src="/static/scripts/sign.js">

</script>
</html>